{{ if .Site.Params.giscus }}
<script src="https://giscus.app/client.js"
        data-repo="{{ .Site.Params.giscus.data_repo}}"
        data-repo-id="{{ .Site.Params.giscus.data_repo_id}}"
        data-category="{{ .Site.Params.giscus.data_category}}"
        data-category-id="{{ .Site.Params.giscus.data_category_id}}"
        data-mapping="{{ .Site.Params.giscus.data_mapping}}"
        data-reactions-enabled="{{ .Site.Params.giscus.data_reactions_enabled}}"
        data-emit-metadata="{{ .Site.Params.giscus.data_emit_metadata}}"
        data-theme="{{ .Site.Params.giscus.data_theme}}"
        data-lang="{{ .Site.Params.giscus.data_lang}}"
        crossorigin="{{ .Site.Params.giscus.crossorigin}}"
        async>
</script>
{{ else if .Site.Params.disqus_proxy }}
<!-- disqus 评论框 end -->
<div id="disqus-comment"></div>
<script src="{{ "js/iDisqus.js" | relURL }}"></script>
<script>
var disq = new iDisqus('disqus-comment', {
    forum: '{{ .Site.DisqusShortname}}',
    api: '{{ .Site.Params.disqus_proxy }}',
	site: '{{ .Site.Params.disqus_site }}',
    mode: 1,
    timeout: 5000,
    init: true,
    emojiPreview: true
});
</script>
{{ else if .Site.DisqusShortname }}
<!-- disqus 评论框 end -->
<div id="disqus-comment"></div>
{{ template "_internal/disqus.html" . }}
{{ else if .Site.Params.twikoo_env_id }}
<div id="twikoo-tcomment"></div>
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.4.14/dist/twikoo.all.min.js"></script>
<script>
    twikoo.init({
        envId: '{{ .Site.Params.twikoo_env_id }}',
        el: '#twikoo-tcomment',
    })
</script>
{{ end }}
